home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Education et Sciences / Physique-Chimie-Biologie / LogicSim 2.7.2b ƒ / LogicSim Manual 2.7d5 / LogicSim Manual 2.7d5.rsrc / TEXT_1300_Advanced Features.txt < prev    next >
Text File  |  1996-01-03  |  8KB  |  78 lines

  1. ADVANCED FEATURES
  2.  
  3. Component Delays and Families    
  4.  
  5. LogicSim 2.7 specifies the propagation delays for a device by storing 6 real values for each pin :
  6.  
  7.   ΓÇó minimum, mean and maximum rise time
  8.   ΓÇó minimum, mean and maximum fall time
  9.  
  10. A selected component is assigned a set of delays with Component DelaysΓǪ from the Circuit menu which gives a choice of a family or none, the latter allows delays for each pin to be changed on an individual basis ΓÇô the values set must satisfy 0<=Min<=Mean<=Max.  If more than one component of the same type has been selected, for example by holding down the Γîÿ key while clicking, the delays are applied to all of them.  Copies made of a component will inherit its family or delays.
  11.  
  12. A family  and its associated delays are defined with Create new familyΓǪ from the Circuit menu.   Components are made members of a family  with the Component DelaysΓǪ dialogue.  Components start life as a member of the Default Delays family which, as distributed, has all its delays zero.  LogicSim families must be stored in the Families folder inside the LogicSim folder.
  13.  
  14. A simulation session runs in one of four possible delay modes:  minimum, mean, maximum, random.  In random mode the delays are distributed between the specified minimum and maximum values.  A logic(X->0) transition uses the  logic(1->0) delays, logic(X->1)uses the logic(0->1) delays.
  15.  
  16. Input and output pins react to delays in slightly different ways.  In the case of an output pin, after an internal change the algorithm 'waits' the specified time before updating the node that is attached to that pin.  For an input pin, after a node changes, the algorithm waits the specified time before updating the internal value (and then proceeding with the internal simulation).  However, if the input node changes its value again before the internal value is updated, then the previous change is discarded, this mechanism acts like a low-pass filter.  Devices like monostables can often be simulated by a single gate just by setting appropriate delays.
  17.  
  18.  
  19. Simulation Speed    
  20.  
  21. A LogicSim simulation cannot run as fast as a real circuit so the user can set the "Simulator clock rate" which is measured in hertz (Hz).  This is the number of simulation time units that happen in one (real world) second.  In fact the number specified by the user is a target ΓÇô the computer may be too slow to achieve it, in which case, the simulation will run as fast as it can (which will be affected by other applications running in the background).
  22.  
  23.  
  24. The Signals Window    
  25.  
  26. This window is an oscilloscope display of the signal levels present at various points in the circuit.  Clicking with the mouse pointer inside this window creates a vertical cursor which can be dragged and used to identify the precise time and sequence of events.  The two buttons on the bottom left stretch or compress the time axis with the cursor acting as an anchor point.  If the simulation becomes stable the recording halts, to prevent long periods of inactivity overwriting more interesting signals, but the time axis can still be advanced manually with the arrow button.  This increases time by the number of steps indicated in the adjacent editable text zone.  This is particularly useful if you are trying to create a picture showing what happens when the inputs to a stable circuit are changed.  Whether or not  clicking a switch and or button on the circuit advances the signals record can be set on the Simulation Options panel.
  27.  
  28.  
  29. Customisation and Modules    
  30.  
  31. LogicSim creates the pallet of standard components by searching the folder "Default components"  (or a folder with this alias) which must be in the same folder as the LogicSim application.  New components or modules can be put in the "Default components" folder (or one of its sub-folders), and rarely-used ones removed, to customise the pallet.  Components are loaded in folder and file name-order, allowing control over how components are arranged on the display.   Loading large numbers of components may take a few seconds when a new document is opened and can be stopped with Γîÿ-. or by typing the esc key.
  32.  
  33. From a technical point of view are three types of component files:   standard components, modules created from a LogicSim circuit, and code resources compiled from Pascal or C source using the software development kit (SDK). However, although each of these types has its own distinct icon they are all used, and can be loaded, in exactly the same ways.
  34.  
  35. Any LogicSim circuit can be stored as a "module" and then used as a building block in more complicated circuits.  The example circuit "3-IP AND cct" performs a 3-input AND operation.  Create ModuleΓǪ from the Circuit menu brings up a preview showing what the module will look like;  the names of the input switches/buttons and output LEDs are used as pin labels.  If the default appearance is acceptable the module can be saved immediately with the SaveΓǪ button.  The appearance of the module can be edited with a drawing package using the Copy and Paste buttons to transfer the PICT image via the clipboard.  The the blue and red circles in the Module dialogue indicate the positions of the input and output terminals respectively and can be repostioned by dragging. The finished module is "3-IP AND" in the Examples folder.  It is not easy to get good results with some drawing packages ΓÇô start with a 1pt pen and a 1dpi grid and experiment.
  36.  
  37. A module can include other modules in its defining circuit and these nested modules will be automatically found and loaded with the main module.  However, take care editing a module "B" that is nested inside another module "A" because if the number of inputs or outputs of module B is changed and then module A  is loaded and used in a simulation it is possible for LogicSim to quit unexpectedly with a Type 1 error.  Give modules unique names to avoid an unintended module, that just happens to have the right name, being found first and loaded.  The Info window shows the progress of automatic loading process which searches down from the LogicSim application directory.
  38.  
  39. If you have Finder 7.1.3 or later you will find that modules can be loaded by dragging straight from the Finder as well as with the Circuit menu item.  Parts can also be dragged from the circuit window onto the Finder or other a suitably drag-friendly application for storage.  A component that is dragged onto the Trash is deleted.
  40.  
  41. If you are areally serious user you will want to write your own modules in C or Pascal, the details of how to do this are in the SDK folder distributed with LogicSim.
  42.  
  43.  
  44. The Stimuli Window    
  45.  
  46. Switches and clocks can be programmed to change states automatically at preset times by listing the sequence and times of actions as commands in the Stimuli window.  The command syntax is:
  47.  
  48.         <ComponentName>:  <TimeSpec1> <State1>  <TimeSpec2> <State2> ΓǪ
  49.  
  50. Syntax errors are reported in the Info window.  Anything following // on a line is treated as a comment.  In LogicSim 2.7 the allowed values for the states are:  for the switch output {L0,L1,LX,LZ};  for the Clock {ON,OFF}.  Unsigned integer TimeSpecs are treated as absolute times in simulation cycles after the Execute button has been pressed.  TimeSpecs preceded by a '+' sign are interpreted as the number of simulation cycles to wait after the previous command until the next.  For example, given the circuit
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. you wish to start the clock at Time=1000 and stop it 500 cycles later, and also to set the switch to logic(0) at Time=0, to logic(1) at Time=500, and return to logic(0) at Time=750.  The following lines need to be typed into the Stimuli Window:
  64.  
  65.     foo: 1000 ON +500 OFF  //Hello World!
  66.     bar: 0 L0 500 L1 750 L0
  67.  
  68. or, equivalently
  69.  
  70.     foo: 1000 ON 1500 OFF
  71.     //Hello Mum!
  72.     bar: 0 L0 +500 L1 +250 L0
  73.  
  74. The commands are listed in the Info window as they are executed.
  75.  
  76.  
  77.  
  78.